#include "WorldProcess.h"
#include "ScriptMgr.h"
#include "NGLog.h"
#include "GatewayOpcodes.h"
#include "GameUserCommand.h"
#include "MJScriptWorldProcess.h"
#include "OpcodesEx.h"
#include "GameServerCommand.h"
#include "CenterBattleManager.h"
#include "CenterBattleLogManager.h"
#include "url.h"
#include "json/json.h"
#include "nxweb/nxweb.h"
#include "MD5.h"

#include "GameDefine.h"
#include LOGIC_MGR_PATH

#include "GameDataEnum.h"


#define SECUREKEY "mef3mervzl1SykohhufmdkhvdbCpokkt"

void register_MJ_world_process(ScriptMgr * mgr)
{
	//==========================麻将相关协议======================================
	//CMSS_MJ_OutCard = 0x2506,		//出牌 对玩家自己
	mgr->register_server_process(CMSS_MJ_OutCard, script_world_process_MJ_CastCard);
	Log.Debug("World Process", "Register opcode 0x%02x Process:[%s]", CMSS_MJ_OutCard, "script_world_process_MJ_CastCard");

	//CMSS_MJ_Operate = 0x2509,		//玩家动作
	mgr->register_server_process(CMSS_MJ_Operate, script_world_process_MJ_Operate);
	Log.Debug("World Process", "Register opcode 0x%02x Process:[%s]", CMSS_MJ_Operate, "script_world_process_MJ_Operate");

	//CMSS_MJ_PlayerStatus = 0x250F,//玩家状态
	mgr->register_server_process(CMSS_MJ_PlayerStatus, script_world_process_MJ_ChangeStatus);
	Log.Debug("World Process", "Register opcode 0x%02x Process:[%s]", CMSS_MJ_PlayerStatus, "script_world_process_MJ_ChangeStatus");

	//CMSS_MJ_PlayerXuanQue = 0x2512,	//玩家选缺
	mgr->register_server_process(CMSS_MJ_PlayerXuanQue, script_world_process_MJ_PlayerXuanQue);
	Log.Debug("World Process", "Register opcode 0x%02x Process:[%s]", CMSS_MJ_PlayerXuanQue, "script_world_process_MJ_PlayerXuanQue");

	//CMSS_MJ_PlayerSwapCard = 0x2515,		//玩家换牌
	mgr->register_server_process(CMSS_MJ_PlayerSwapCard, script_world_process_MJ_SwapCard);
	Log.Debug("World Process", "Register opcode 0x%02x Process:[%s]", CMSS_MJ_PlayerSwapCard, "script_world_process_MJ_SwapCard");

	//CMSS_MJ_BankerChooseSwapPos = 0x2520,			//玩家选择换牌位置
	mgr->register_server_process(CMSS_MJ_BankerChooseSwapPos, script_world_process_MJ_SwapCardPos);
	Log.Debug("World Process", "Register opcode 0x%02x Process:[%s]", CMSS_MJ_BankerChooseSwapPos, "script_world_process_MJ_SwapCardPos");

	//============================================================================
}

//-----------------------------------------------------------------------


